// pages/moment/toMomentDetails/toMomentDetails.js
var utils = require('../../utils/util')
var http = require('../../utils/http')
Page({

    /**
     * 页面的初始数据
     */
    data: {
        item:{},
        lookLikeFavourite:{}
    },



    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        
        let item = JSON.parse(decodeURIComponent(options.item))
        this.setData({
            item:item,
        })
        console.log(this.data.item);
        this.setData({
            'lookLikeFavourite.type': this.data.item.topicType,
            'lookLikeFavourite.lookId': this.data.item.id
        })
        
    },

    handleItemChange(e){
        let eventChannel = this.getOpenerEventChannel()
        this.setData({
            item:e.detail
        })
        eventChannel.emit("itemChange",{
            data:this.data.item
        })
    }

})